﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace SPFileSize.ListItemSizeWebPart
{
    public class SPFileSizeInfo
    {
        public string ItemTitle { get; set; }
        public string ItemPath { get; set; }
        public double ItemSize { get; set; }
        public List<SPFileSizeInfo> ItemSizeInfo { get; set; }
        public int ItemID { get; set; }

        public string ContainerPath { get; set; }
        public string ContainerGuid { get; set; }

        public double ContainerSize
        {
            get
            {
                double size = 0;
                foreach (SPFileSizeInfo item in this.ItemSizeInfo)
                {
                    size += item.ItemSize;

                }
                return size;
            }
        }

    }
}
